-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
3: Add function fit_beta_mixture
#15
Conversation
This looks great. I feel a fraud reviewing this because I have not used EM in over 10 years, and I speak so little Julia. But the code looks sensible, the tests look sensible, and the tests succeed. I am inclined to add the known R examples (currently explored in a Pluto notebook) to the tests suite. That would entail adding various CSV files to the package. Do you support that? If so I could research how best to add datasets to a Julia package. Maybe @dgkf-roche knows..?? |
Great, thanks @brockk - yeah if you could add those known R examples as tests that would be great to further increase the confidence in the code! |
I found https://discourse.julialang.org/t/best-practice-for-storing-data-in-packages/36808/2 which might be a good first solution (not the |
Added more tests of fit_beta_mixture and meta_analytic to reproduce known examples from R
@brockk so I see now:
I will have a look |
Abs difference of 0.0102 with atol = 0.01. I would just increase atol. |
Calibrating atol / rtol with MC variables usually involves a bit of trial-and-error |
I changed to the NUTS sampler because it works better in my experience with the model so far, and then we also don't need to discard a burn-in period. With this we can be stricter (relative instead of absolute tolerance) in the tests. One question @brockk - for the "Reconcile fit_beta_mixture ..." tests - how about saving the |
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #15 +/- ##
=======================================
Coverage ? 94.80%
=======================================
Files ? 4
Lines ? 77
Branches ? 0
=======================================
Hits ? 73
Misses ? 4
Partials ? 0 ☔ View full report in Codecov by Sentry. |
@brockk thanks for the discussion yesterday, today I tried to do this as we said yesterday - somehow it was still a bit too complex for my taste, so I ended up simplifying further - in the end we don't really need a sample of pi_star for this test, it can be any other sample of values |
closes #3